itk_module_test()
set(ITKMeshTests
itkAutomaticTopologyMeshSourceTest.cxx
itkImageToParametricSpaceFilterTest.cxx
itkInteriorExteriorMeshFilterTest.cxx
itkParametricSpaceToImageSpaceMeshFilterTest.cxx
itkRegularSphereMeshSourceTest.cxx
itkSimplexMeshTest.cxx
itkSimplexMeshAdaptTopologyFilterTest.cxx
itkSimplexMeshToTriangleMeshFilterTest.cxx
itkSimplexMeshVolumeCalculatorTest.cxx
itkSphereMeshSourceTest.cxx
itkTransformMeshFilterTest.cxx
itkTriangleMeshToBinaryImageFilterTest.cxx
itkTriangleMeshToBinaryImageFilterTest2.cxx
itkTriangleMeshToBinaryImageFilterTest3.cxx
itkTriangleMeshToSimplexMeshFilterTest.cxx
itkVTKPolyDataReaderTest.cxx
itkVTKPolyDataWriterTest01.cxx
itkVTKPolyDataWriterTest02.cxx
itkWarpMeshFilterTest.cxx
itkMeshTest.cxx
itkBinaryMask3DMeshSourceTest.cxx
itkDynamicMeshTest.cxx
itkExtractMeshConnectedRegionsTest.cxx
itkMeshFstreamTest.cxx
itkMeshSourceGraftOutputTest.cxx
itkMeshSpatialObjectIOTest.cxx
itkTriangleMeshToSimplexMeshFilter2Test.cxx
)

set(ITKMesh-Test_LIBRARIES ${ITKMesh-Test_LIBRARIES} ITKSpatialObjects)
CreateTestDriver(ITKMesh  "${ITKMesh-Test_LIBRARIES}" "${ITKMeshTests}")

itk_add_test(NAME itkMeshTest
      COMMAND ITKMeshTestDriver itkMeshTest)
itk_add_test(NAME itkSimplexMeshTest
      COMMAND ITKMeshTestDriver itkSimplexMeshTest)
itk_add_test(NAME itkAutomaticTopologyMeshSourceTest
      COMMAND ITKMeshTestDriver itkAutomaticTopologyMeshSourceTest)
itk_add_test(NAME itkBinaryMask3DMeshSourceTest
      COMMAND ITKMeshTestDriver itkBinaryMask3DMeshSourceTest)
itk_add_test(NAME itkImageToParametricSpaceFilterTest
      COMMAND ITKMeshTestDriver itkImageToParametricSpaceFilterTest)
itk_add_test(NAME itkInteriorExteriorMeshFilterTest
      COMMAND ITKMeshTestDriver itkInteriorExteriorMeshFilterTest)
itk_add_test(NAME itkRegularSphereMeshSourceTest
      COMMAND ITKMeshTestDriver itkRegularSphereMeshSourceTest)
itk_add_test(NAME itkSimplexMeshAdaptTopologyFilterTest
      COMMAND ITKMeshTestDriver itkSimplexMeshAdaptTopologyFilterTest)
itk_add_test(NAME itkSimplexMeshToTriangleMeshFilterTest
      COMMAND ITKMeshTestDriver itkSimplexMeshToTriangleMeshFilterTest)
itk_add_test(NAME itkSimplexMeshVolumeCalculatorTest
      COMMAND ITKMeshTestDriver itkSimplexMeshVolumeCalculatorTest)
itk_add_test(NAME itkSphereMeshSourceTest
      COMMAND ITKMeshTestDriver itkSphereMeshSourceTest)
itk_add_test(NAME itkTransformMeshFilterTest
      COMMAND ITKMeshTestDriver itkTransformMeshFilterTest)
itk_add_test(NAME itkTriangleMeshToBinaryImageFilterTest
      COMMAND ITKMeshTestDriver itkTriangleMeshToBinaryImageFilterTest
              ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest.mha)
itk_add_test(NAME itkTriangleMeshToBinaryImageFilterTest2
      COMMAND ITKMeshTestDriver itkTriangleMeshToBinaryImageFilterTest2
              ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest2.mha)
itk_add_test(NAME itkTriangleMeshToBinaryImageFilterTest3
      COMMAND ITKMeshTestDriver itkTriangleMeshToBinaryImageFilterTest3
              ${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk ${ITK_TEST_OUTPUT_DIR}/itkTriangleMeshToBinaryImageFilterTest3.mha 140 160 180 -0.7 -0.8 -0.9 0.01 0.01 0.01)
itk_add_test(NAME itkTriangleMeshToSimplexMeshFilterTest
      COMMAND ITKMeshTestDriver itkTriangleMeshToSimplexMeshFilterTest)
itk_add_test(NAME itkVTKPolyDataReaderTest
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/genusZeroSurface01.vtk)
itk_add_test(NAME itkVTKPolyDataReaderTest2
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/sphereBinary.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest0
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad0.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest1
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad1.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest2
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad2.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest3
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad3.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest4
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad4.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest5
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad5.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest6
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad6.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest7
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad7.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest8
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad8.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest9
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad9.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest10
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad10.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest11
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad11.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest12
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad12.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest13
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad13.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest14
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad14.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest15
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad15.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest16
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad16.vtk)
itk_add_test(NAME itkVTKPolyDataReaderBadTest17
      COMMAND ITKMeshTestDriver itkVTKPolyDataReaderTest
              ${ITK_DATA_ROOT}/Input/vtkPolyDataBad17.vtk)
itk_add_test(NAME itkVTKPolyDataWriterTest01
      COMMAND ITKMeshTestDriver itkVTKPolyDataWriterTest01
              ${ITK_TEST_OUTPUT_DIR}/VTKPolyDataWriterTest01.vtk)
itk_add_test(NAME itkVTKPolyDataWriterTest02
      COMMAND ITKMeshTestDriver itkVTKPolyDataWriterTest02
              ${ITK_TEST_OUTPUT_DIR}/VTKPolyDataWriterTest02.vtk)
itk_add_test(NAME itkWarpMeshFilterTest
      COMMAND ITKMeshTestDriver itkWarpMeshFilterTest)
itk_add_test(NAME itkDynamicMeshTest
      COMMAND ITKMeshTestDriver itkDynamicMeshTest)
itk_add_test(NAME itkExtractMeshConnectedRegionsTest
      COMMAND ITKMeshTestDriver itkExtractMeshConnectedRegionsTest)
itk_add_test(NAME itkMeshFstreamTest
      COMMAND ITKMeshTestDriver itkMeshFstreamTest
              ${ITK_TEST_OUTPUT_DIR}/testMeshFstream.txt)
itk_add_test(NAME itkMeshSourceGraftOutputTest
      COMMAND ITKMeshTestDriver itkMeshSourceGraftOutputTest)
itk_add_test(NAME itkMeshSpatialObjectIOTest
      COMMAND ITKMeshTestDriver itkMeshSpatialObjectIOTest
              ${ITK_TEST_OUTPUT_DIR}/metameshIOTest.txt)
itk_add_test(NAME itkMeshSpatialObjectIOTest1
      COMMAND ITKMeshTestDriver itkMeshSpatialObjectIOTest
              ${ITK_TEST_OUTPUT_DIR}/metameshIOTest1.txt binary)
itk_add_test(NAME itkMeshSpatialObjectIOTest2
      COMMAND ITKMeshTestDriver itkMeshSpatialObjectIOTest
              ${ITK_TEST_OUTPUT_DIR}/metameshIOTest2.txt ${ITK_DATA_ROOT}/Input/metamesh.txt)
itk_add_test(NAME itkTriangleMeshToSimplexMeshFilter2Test
      COMMAND ITKMeshTestDriver itkTriangleMeshToSimplexMeshFilter2Test)



SET_TESTS_PROPERTIES(itkVTKPolyDataReaderTest2
   itkVTKPolyDataReaderBadTest0
   itkVTKPolyDataReaderBadTest1
   itkVTKPolyDataReaderBadTest2
   itkVTKPolyDataReaderBadTest3
   itkVTKPolyDataReaderBadTest4
   itkVTKPolyDataReaderBadTest5
   itkVTKPolyDataReaderBadTest6
   itkVTKPolyDataReaderBadTest7
   itkVTKPolyDataReaderBadTest8
   itkVTKPolyDataReaderBadTest9
   itkVTKPolyDataReaderBadTest10
   itkVTKPolyDataReaderBadTest11
   itkVTKPolyDataReaderBadTest12
   itkVTKPolyDataReaderBadTest13
   itkVTKPolyDataReaderBadTest14
   itkVTKPolyDataReaderBadTest15
   itkVTKPolyDataReaderBadTest16
   itkVTKPolyDataReaderBadTest17
   PROPERTIES WILL_FAIL true)
